Optimal. Leaf size=25 \[ -\frac{a x^{-2 n}}{2 n}-\frac{b x^{-n}}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0072845, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {14} \[ -\frac{a x^{-2 n}}{2 n}-\frac{b x^{-n}}{n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin{align*} \int x^{-1-2 n} \left (a+b x^n\right ) \, dx &=\int \left (a x^{-1-2 n}+b x^{-1-n}\right ) \, dx\\ &=-\frac{a x^{-2 n}}{2 n}-\frac{b x^{-n}}{n}\\ \end{align*}
Mathematica [A] time = 0.0099992, size = 20, normalized size = 0.8 \[ -\frac{x^{-2 n} \left (a+2 b x^n\right )}{2 n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 27, normalized size = 1.1 \begin{align*}{\frac{1}{ \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}} \left ( -{\frac{a}{2\,n}}-{\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{n}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.01105, size = 43, normalized size = 1.72 \begin{align*} -\frac{2 \, b x^{n} + a}{2 \, n x^{2 \, n}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.4273, size = 24, normalized size = 0.96 \begin{align*} \begin{cases} - \frac{a x^{- 2 n}}{2 n} - \frac{b x^{- n}}{n} & \text{for}\: n \neq 0 \\\left (a + b\right ) \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14435, size = 27, normalized size = 1.08 \begin{align*} -\frac{2 \, b x^{n} + a}{2 \, n x^{2 \, n}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]